1. Field of the Invention
This invention is related to computer systems and, more particularly, to coherency mechanisms within computer systems.
2. Description of the Related Art
Typically, computer systems include one or more caches to reduce the latency of a processor""s access to memory. Generally, a cache may store one or more blocks, each of which is a copy of data stored at a corresponding address in the memory system of the computer system.
Since a given block may be stored in one or more caches, and further since one of the cached copies may be modified with respect to the copy in the memory system, computer systems often maintain coherency between the caches and the memory system. Coherency is maintained if an update to a block is reflected by other cache copies of the block according to a predefined coherency protocol. Various coherency protocols are used. As used herein, a xe2x80x9cblockxe2x80x9d is a set of bytes stored in contiguous memory locations which are treated as a unit for coherency purposes. In some embodiments, a block may also be the unit of allocation and deallocation in a cache. The number of bytes in a block may be varied according to design choice, and may be of any size. As an example, 32 byte and 64 byte blocks are often used.
Many coherency protocols include the use of probes to communicate between various caches within the computer system. Generally speaking, a xe2x80x9cprobexe2x80x9d is a message passed from the coherency point in the computer system to one or more caches in the computer system to determine if the caches have a copy of a block and optionally to indicate the state into which the cache should place the block. The coherency point may transmit the probes in response to a command from a component (e.g. a processor) to read or write the block. Each probe receiver responds to the probe, and once the probe responses are received the command may proceed to completion. The coherency point is the component responsible for maintaining coherency, e.g. a memory controller for the memory system.
Unfortunately, probes increase the bandwidth demands on the computer system and may increase the latency of the commands. Bandwidth demands are increased because the probes are transmitted through the interconnect of the computer system. Latency may increase because the probe responses are needed to verify that the data to be provided in response to the command is the correct copy of the block (i.e. that no cache stores an updated copy of the block). Accordingly, it is desirable to reduce the probe traffic in a computer system while still maintaining coherency.
The problems outlined above are in large part solved by a victim record table as described herein. The victim record table records victim blocks which have been returned from a cache to memory and which are not currently cached in any other caches. If a command affecting a block recorded in the victim record table is received, one or more probes corresponding to the command may be inhibited even if probes would ordinarily be transmitted for the command. Advantageously, system bandwidth which would be consumed by the probes may be conserved. Furthermore, since probes are inhibited, the latency of the command may be reduced since the command may be completed without waiting for any probe responses.
Since probes are selectively inhibited if an affected block is recorded in the victim record table, the size of the victim record table may be flexible. If a particular block is not represented in the victim record table, probes are performed when the particular block is accessed (even if the particular block could have been represented in the victim record table but is not because of a limited number of records). Thus, coherency is maintained even if every uncached block is not represented in the victim record table. Accordingly, the victim record table may be sized according to cost versus performance tradeoffs (and not according to concerns about correctly maintaining coherency).
Broadly speaking, an apparatus is contemplated, comprising a table and a control circuit. The table is configured to store a plurality of records, wherein a first record of the plurality of records is configured to identify a first block previously received as a victim block by a memory controller. Coupled to the table, the control circuit is configured to inhibit issuance of one or more probes for a first read command responsive to the first read command accessing the first block.
Additionally, a computer system is contemplated comprising a memory, a memory controller coupled to the memory, and a source coupled to the memory controller. The memory controller includes a table configured to store a plurality of records, wherein a first record of the plurality of records is configured to identify a first block previously received by the memory controller as a victim block. The source is configured to transmit a first read command to the memory controller. The memory controller is configured to inhibit issuance of one or more probes for the first read command responsive to the first read command accessing the first block.
Still further, a method is contemplated. A table having a plurality of records is maintained, wherein each record of the plurality of records is configured to identify a respective block previously received by a memory controller as a victim block. One or more probes are selectively issued for a first read command responsive to whether or not a first block accessed by the first read command is identified by a first record of the plurality of records.